﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChaoBiaoSJXG.aspx.cs" Inherits="Web.Pages.YongShui._4.ChaoBiaoKZ.ChaoBiaoSJXG" Theme="Default" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>




<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>抄表数据修改</title>
    <script src="../../../JS/jquery.js"></script>
    <script src="../../../JS/AddEditCancel.js"></script>
    <link href="../../../css/inputBgColor.css" rel="stylesheet" />
    <script type="text/javascript">
        function EnterNext(index)
        {
           
            if (event.keyCode == 13) {
                var controls = new Array();
                controls[0] = document.getElementById("TextChaoBiaoRQ_I");
                controls[1] = document.getElementById("TextBenYueCM_I");
                controls[2] = document.getElementById("TextBenYueSL_I");
                controls[3] = document.getElementById("DrpChaoBiaoZT_I");
                if (index < 3) {
                    controls[index + 1].focus();
                }

            }
            else {

            }
        }
        function Select()
        {
            if (event.keyCode == 13)
            {
                if (txtNo.GetText()=="")
                {
                    alert("请输入水表编号");
                    return;
                }
                btnSearch.onClick();
            }
        }
        function SelectZT(s)
        {
            if (s.GetValue() == "4") {
                TextBenYueSL.SetText("0");
                //JIAODUISL.SetText("0");
                TextBenYueCM.SetText(TextShangYueCM.GetText());
                TextBenYueSL.SetEnabled(false);
                TextBenYueCM.SetEnabled(false);
            }
            else {
                TextBenYueSL.SetEnabled(true);
                TextBenYueCM.SetEnabled(true);
            }
        }
        function JiSuanJDSL()
        {
            ASPxCallback1.PerformCallback("jdsl");
        }
        
        function ASPxCallbackCommonComplete(rs) {

            var list = rs.split('|');
            var type = list[0];
            var code = list[1];
            var msg = list[2];
            if (type == "jdsl")
            {
                if (code > 0) {
                    JIAODUISL.SetText(msg);
                }
                else {
                    JIAODUISL.SetText("0");
                }
            }
        }
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
         <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallbackCommonComplete(e.result);}"></dx:ASPxCallback>
        <dx:ASPxHiddenField ID="HiddenList" ClientInstanceName="HiddenList" runat="server"></dx:ASPxHiddenField>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div class="tabletitle1">
                    抄表数据修改
                </div>
                <table style="width: 100%;">
                    <tr>
                        <td  style="width:40px">站点：
                        </td>
                        <td style="width:80px">
                            <dx:ASPxComboBox ID="DrpSite" runat="server" Width="100%" ValueType="System.String"></dx:ASPxComboBox>

                        </td>
                        <td  style="width:80px" align="right">水表编号：
                        </td>
                        <td  style="width:150px">
                            <dx:ASPxTextBox ID="txtNo" ClientInstanceName="txtNo" runat="server" Width="100%">
                                <ClientSideEvents KeyUp="function(s,e){Select();}" />
                            </dx:ASPxTextBox>
                        </td>
                        <td align="left" style="padding-left:5px">
                            <dx:ASPxButton ID="btnSearch" ClientInstanceName="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" UseSubmitBehavior="false">
                            </dx:ASPxButton>
                        </td>
                        <td align="right">水量年月：
                        </td>
                        <td width="50px">

                            <dx:ASPxTextBox ID="TextStart" runat="server" Width="50px"></dx:ASPxTextBox>

                        </td>
                        <td width="5px">- 

                        </td>
                        <td width="30px">
                            <dx:ASPxTextBox ID="TextEnd" runat="server" Width="30px"></dx:ASPxTextBox>
                        </td>
                    </tr>



                </table>
                <fieldset style="border: 1px solid  cornflowerblue;">
                    <table style="width: 100%; ">
                        <tr>
                            <td align="right" style="width:70px">用户号：</td>

                            <td >
                                <dx:ASPxTextBox ID="TextUserNo"  runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                            <td style="width:110px"></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td align="right">用户名：</td>
                            <td >
                                <dx:ASPxTextBox ID="TextUserName" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                             <td></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td align="right">水表地址：</td>
                            <td colspan="3">
                                <dx:ASPxTextBox ID="TextSBAdress" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">水表户名：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextSBYH" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                            <td align="right">用水价：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextWaterPrice" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">册号：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextCeHao" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                            <td align="right">管网块号：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextGuanWangKH" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">水表类型：</td>
                            <td>
                                <dx:ASPxComboBox ID="DrpSBLX" runat="server" Width="100%" ValueType="System.String"></dx:ASPxComboBox>


                            </td>
                            <td align="right">口径：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextKouJing" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">抄表日期：</td>
                            <td>
                                <dx:ASPxDateEdit ID="TextChaoBiaoRQ" ClientSideEvents-KeyUp="function(s,e){inputNum(s);EnterNext(0);}" ClientInstanceName="TextChaoBiaoRQ" runat="server" Width="100%">
                                </dx:ASPxDateEdit>
                            </td>
                            <td align="right">上月抄表日期：</td>
                            <td>
                                <dx:ASPxDateEdit ID="TextShangYueCBRQ"  ClientInstanceName="TextShangYueCBRQ" runat="server" Width="100%">
                                </dx:ASPxDateEdit>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">本月抄码：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextBenYueCM" ClientSideEvents-KeyUp="function(s,e){inputNum(s);EnterNext(1);}" ClientInstanceName="TextBenYueCM" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                            <td align="right">上月抄码：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextShangYueCM" ClientInstanceName="TextShangYueCM" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">本月水量：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextBenYueSL"  ClientSideEvents-KeyUp="function(s,e){inputNum(s);EnterNext(2);JiSuanJDSL();}" ClientInstanceName="TextBenYueSL" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                            <td align="right">校准水量：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextShangYueSL" ClientInstanceName="JIAODUISL" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">抄表状态：</td>
                            <td>
                                <dx:ASPxComboBox ID="DrpChaoBiaoZT"  runat="server"  ClientInstanceName="DrpChaoBiaoZT" Width="100%" ValueType="System.String">
                                    <ClientSideEvents SelectedIndexChanged="function(s,e){SelectZT(s);JiSuanJDSL();}" />
                                </dx:ASPxComboBox>
                            </td>

                            <td align="right">水司状态：</td>
                            <td>
                                <dx:ASPxTextBox ID="TextShuiSiZT" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">估计次数：</td>
                            <td >
                                <dx:ASPxTextBox ID="TextGuJiCS" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                            <td></td>
                            <td></td>
                        </tr>
                    </table>

                </fieldset>
                <hr />
                <table style="width: 100%">
                    <tr>
                        <td align="right">

                            <dx:ASPxButton ID="BtnModify" runat="server" Text="修改" UseSubmitBehavior="false" OnClick="BtnModify_Click">
                            </dx:ASPxButton>
                            <dx:ASPxButton ID="BtnSave" runat="server" Text="保存" UseSubmitBehavior="false" OnClick="BtnSave_Click">
                            </dx:ASPxButton>
                            <dx:ASPxButton ID="BtnCannle" runat="server" Text="放弃" UseSubmitBehavior="false" OnClick="BtnCannle_Click">
                            </dx:ASPxButton>
                        </td>
                    </tr>

                </table>
                <dx:ASPxTextBox ID="id" runat="server" Width="170px" Visible="false"></dx:ASPxTextBox>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
